﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChiakiYu.Common.Data
{
    /// <summary>
    /// 返回值数据：状态和内容
    /// </summary>
    [Serializable]
    public class MessageData
    {
        /// <summary>
        /// 构造器
        /// </summary>
        /// <param name="messageType">提示信息类型</param>
        /// <param name="messageContent">提示信息内容</param>
        public MessageData(MessageType messageType, string messageContent)
        {
            MessageType = messageType;
            MessageContent = messageContent;
        }

        /// <summary>
        /// 提示信息类型
        /// </summary>
        public MessageType MessageType { get; set; }


        /// <summary>
        /// 提示信息内容
        /// </summary>
        public string MessageContent { get; set; }
    }

    /// <summary>
    /// 提示信息类型
    /// </summary>
    public enum MessageType
    {
        /// <summary>
        /// 成功
        /// </summary>
        Success = 1,

        /// <summary>
        /// 错误
        /// </summary>
        Error = -1,

        /// <summary>
        /// 警告，提示信息
        /// </summary>
        Hint = 0
    }
}
